﻿using System.Collections.Generic;
using System.Web.Mvc;
using CodeGeneratorLibrary;
using Templates.Bitrix;
using Templates.Interfaces;

namespace BitrixCodeGenerator.Controllers
{
	public class HomeController : Controller
	{
		private readonly Options options = Options.Factory;

		public ActionResult Index()
		{
			ViewBag.Message = "Welcome to ASP.NET MVC!";

			return View();
		}

		public ActionResult Code(CodeFileType type)
		{
			var messages = new List<string>();
			ViewBag.Messages = messages;

			Rendering.Render(type, messages);

			return View("Index");
		}

		public ActionResult About()
		{
			return View();
		}
	}
}